
//我的界面中的各个小标签
import { View,Image} from '@tarojs/components'
import Taro from '@tarojs/taro'
import './index.scss'

export default function MineItem(props){

const handleClick=()=>{
  if(!props.jumpto){
    Taro.showToast({
      title:'功能建设中',
      icon:'error',
      duration:1000
    })
  }
  if(Taro.getStorageSync(`auth`)){
    Taro.navigateTo({
      url: `/mine/pages/${props.jumpto}/${props.jumpto}`,
    })
  }else{
    Taro.showToast({
      title: '请先登录',
      icon: 'error',
      duration: 1500
    })
  }
}

  return(
    
  <View className='at-row MineItemCard' onClick={handleClick}>

    <View className='at-col at-col-2'>
      <Image  className='image' src={props.src} />
    </View>


    <View className='at-col at-col-10'>
      <View className='text'>
      {props.context}
      </View>
      </View>

  </View>
  )
    
    
 

}